<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理后台</title>
    <link rel="stylesheet" href="./css/houtai.css">
    <link rel="stylesheet" href="./css/houtai_log.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <!-- 引入jQuery -->
    <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> -->
    <script src="./assets/jquery-3.6.0.min.js"></script>
    <!-- 引入toastr -->
    <!-- 添加Toast提示框组件 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css"> 
    <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
</head>
<body>
    <div class="wrapper">
        <!-- 侧边栏 -->
        <aside class="sidebar">
            <div class="logo">
                <h2>超市管理系统</h2>
            </div>
            <ul class="menu">
                <li><a href="./houtai_gzt.html" class="menuItem"><i class="fas fa-tachometer-alt"></i><span>工作台</span></a></li>
                <li><a href="./houtai_user.html" class="menuItem"><i class="fas fa-users"></i><span>用户管理</span></a></li>
                <li><a href="./houtai_product.html" class="menuItem"><i class="fas fa-box"></i><span>商品管理</span></a></li>
                <li><a href="./houtai_order.html" class="menuItem"><i class="fas fa-shopping-cart"></i><span>订单管理</span></a></li>
                <li><a href="./houtai_stock.html" class="menuItem"><i class="fas fa-warehouse"></i><span>库存管理</span></a></li>
                <li><a href="./houtai_log.html" class="menuItem active"><i class="fas fa-history"></i><span>日志记录</span></a></li>
            </ul>
        </aside>

        <!-- 主体部分 -->
        <main class="main-content">
            <header class="header">
                <a id="collapse" href="javascript:void(0)">
                    <i class="fas fa-bars"></i>
                </a>
                <div class="header-title">日志记录</div>
                <div class="user-info">
                    <span>欢迎，管理员</span>
                    <button id="logoutBtn">退出</button>
                </div>
            </header>

            <!-- 日志管理内容 -->
            <div class="content-wrapper">
                <div class="content-body">
                    <div class="log-table">
                        <table>
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>用户名</th>
                                    <th>操作内容</th>
                                    <th>操作类型</th>
                                    <th>IP地址</th>
                                    <th>操作时间</th>
                                </tr>
                            </thead>
                            <tbody id="logTableBody">
                                <!-- 日志数据将通过JavaScript动态插入 -->
                            </tbody>
                        </table>
                    </div>
                    <!-- 分页控件 -->
                    <div class="pagination">
                        <button id="prevPage" onclick="prevPage()" class="page-btn">
                            <i class="fas fa-chevron-left"></i> 上一页
                        </button>
                        <div class="page-info">
                            <span id="pageInfo">第 1 页 / 共 1 页</span>
                            <span id="totalInfo">共 0 条</span>
                        </div>
                        <button id="nextPage" onclick="nextPage()" class="page-btn">
                            下一页 <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>
            </div>
        </main>
    </div>
    
    <script src="./js/houtai.js"></script>
    <script src="./js/houtai_log.js"></script>
</body>
</html>
